/*    */ package com.zimbra.cs.mailclient.imap;
/*    */ 
/*    */ import com.zimbra.cs.mailclient.ParseException;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public final class CopyResult
/*    */ {
/*    */   private final long uidValidity;
/*    */   private final long[] fromUids;
/*    */   private final long[] toUids;
/*    */   
/*    */   public static CopyResult parse(ImapInputStream is)
/*    */     throws IOException
/*    */   {
/* 29 */     is.skipChar(' ');
/* 30 */     long uidValidity = is.readNZNumber();
/* 31 */     is.skipChar(' ');
/* 32 */     is.skipSpaces();
/* 33 */     String fromSet = is.readText(" ");
/* 34 */     is.skipChar(' ');
/* 35 */     is.skipSpaces();
/* 36 */     String toSet = is.readText(" ]");
/*    */     try {
/* 38 */       return new CopyResult(uidValidity, fromSet, toSet);
/*    */     } catch (IllegalArgumentException e) {
/* 40 */       throw new ParseException("Invalid COPYUID result");
/*    */     }
/*    */   }
/*    */   
/*    */   private CopyResult(long uidValidity, String fromUidSet, String toUidSet) {
/* 45 */     this.uidValidity = uidValidity;
/* 46 */     this.fromUids = ImapUtil.parseUidSet(fromUidSet);
/* 47 */     this.toUids = ImapUtil.parseUidSet(toUidSet);
/* 48 */     if (this.fromUids.length != this.toUids.length) {
/* 49 */       throw new IllegalArgumentException();
/*    */     }
/*    */   }
/*    */   
/*    */   public long getUidValidity() {
/* 54 */     return this.uidValidity;
/*    */   }
/*    */   
/*    */   public long[] getFromUids() {
/* 58 */     return this.fromUids;
/*    */   }
/*    */   
/*    */   public long[] getToUids() {
/* 62 */     return this.toUids;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/mailclient/imap/CopyResult.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */